import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsOptional } from 'class-validator';

export class CreateOrUpdateAreaAdminReqDto {
  @ApiProperty({ description: '区域名称' })
  @IsNotEmpty({ message: '区域名称不能为空' })
  @IsString({ message: '区域名称格式不正确' })
  readonly name: string;

  @ApiProperty({ description: '区域名称', required: false })
  @IsString({ message: '区域名称格式不正确' })
  @IsOptional()
  readonly description: string;
}
